import type { RouteRecordRaw } from "vue-router";
/**
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      hidden：        是否隐藏此路由
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: { title: "登录" },
  },
  {
    path: "/center/me_center",
    component: () => import("@/views/center/components/meCenter/index.vue"),
    meta: {
      title: "我的页面",
    },
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('@/views/home/index.vue'),
    meta:{title:'中舞网_爱一格旗下舞蹈网'}
  },
  {
    path:'/discovery',
    name:'discovery',
    component: () => import('@/views/discovery/index.vue'),
    meta:{title:'购买舞蹈视频课'}
  },
  {
    path: "/trainingRoom",
    name: "trainingRoom",
    component: () => import("@/views/trainingRoom/index.vue"),
    meta: { title: "我的练习室" },
  },
  {
    path:'/my',
    name:'my',
    component: () => import('@/views/my/index.vue'),
    meta:{title:'资源动态_我的_中舞网'},
    children:[
      {
        path: '/my/dynamics',
        name: 'Dynamics',
        component: () => import('@/views/my/components/rightView/components/resource/index.vue'),
        // children:[
         
        // ]
      },
      {
        path: '/member',
        name: 'Member',
        component: () => import('@/views/my/components/rightView/components/member/index.vue')
      },
      {
        path: '/my',
        redirect: '/my/dynamics'
      },
  
    ]
  },
  {
    path: "/trainingRoom",
    name: "trainingRoom",
    component: () => import("@/views/trainingRoom/index.vue"),

    children: [
      {
        name: "History",
        path: "history",
        component: () =>
          import("@/views/trainingRoom/components/History/index.vue"),
        meta: {
          title: "历史记录",
        },
      },
      {
        name: "Practice",
        path: "practice",
        component: () =>
          import("@/views/trainingRoom/components/Practice/index.vue"),
        meta: {
          title: "我的练习室",
        },
      },
      {
        name: "Details",
        path: "details",
        component: () =>
          import("@/views/trainingRoom/components/Details/index.vue"),
        meta: {
          title: "练习室视频详情页",
        },
      },
    ],
    redirect: "/trainingRoom/practice",
    meta: { title: "我的练习室" },
  },
  {
    path: "/videoPlay",
    name: "VideoPlay",
    component: () => import("@/views/home/children/videoPlay/index.vue"),
    props: (route) => {
      return {
        momentId: route.query.momentId,
      };
    },
    meta: { title: "视频播放" },
  },
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
  },

  {
    path: '/my/dynamics/edit',
    name: 'Edit',
    component: () => import('@/views/my/components/rightView/components/resource/components/edit/index.vue'),
  },
  /* 匹配任意的路由 必须最后注册 */
  {
    path: "/:pathMatch(.*)",
    name: "Any",
    redirect: "/404",
    meta: {
      hidden: true,
    },
  },
];


/**
 * 定义动态路由
 */
export const allAsyncRoutes: Array<RouteRecordRaw> = [];
